/**
 * Created by Administrator on 2017\9\21 0021.
 */
//确认
function savesuccess(id,hh) {
    var work_order_id = $("input[name='workOrderStatus"+id+"']").val();
    var work_order_status = $("#_orderStatus"+work_order_id+" option:selected").val();
    var remarks = $("#remarks"+work_order_id).val();
    if (hh == 5) {  // 回收站
        var srcs = "/admin/workorder/recycle";
    }
    if (hh == 1) { // 续费
        var srcs = "/admin/workorder/renew";
    }
    if (hh == 2) { // 换芯
        var srcs = "/admin/workorder/core";
    }
    if (hh == 3) { // 未指派
        var srcs = "/admin/workorder/unassigned";
    }
    if (hh == 4) { // 已指派
        var srcs = "/admin/workorder/assigned";
    }

    $.getJSON("/admin/workorder/status",{remarks:remarks,work_order_status:work_order_status,work_order_id:work_order_id},function(data){

           if (data.status == 0) {
               layer.msg(data.message, {time: 1000,icon: 2});
           }else{
               layer.msg(data.message, {time: 1000,icon: 1});
                $("#mainFrame").attr("src",srcs)
           }
    });

	$(".layui-layer-shade").remove();
	$(".layui-layer").remove();

}

//取消
function layuihide() {
	$(".layui-layer").remove();
	$(".layui-layer-shade").remove();
}